// ==UserScript==

// @name          Toolbox Helper

// @namespace     http://www.bazaarvoice.com

// @description   New styles for Toolbox

// @include       http://lab-design03.lab:8080/*

// ==/UserScript==

var link = window.document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'http://toolbox-styles.googlecode.com/svn/trunk/sandbox.css';
document.getElementsByTagName("HEAD")[0].appendChild(link);

//document.body.innerHTML= document.body.innerHTML.replace(/svn: Working copy \'\/svnwork\/customers\/trunk\' locked; try performing \'cleanup\'/g,"Hit \"Update\"");

(function() {
  var replacements, regex, key, textnodes, node, s; 

  replacements = { 
    
    "Last Save": "Saved",
    "Last Update": "Updated",
    "Created By": "Owner",
    };

regex = {}; 
for (key in replacements) { 
    regex[key] = new RegExp(key, 'g'); 
} 

textnodes = document.evaluate( "//body//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); 

for (var i = 0; i < textnodes.snapshotLength; i++) { 
    node = textnodes.snapshotItem(i); 
    s = node.data; 
    for (key in replacements) { 
        s = s.replace(regex[key], replacements[key]); 
    } 
    node.data = s; 
} 

})();